var dirX = 0;
var dirY = 0;

if (keyboard_check(ord('I')))
{
    dirY += -1;
}
if (keyboard_check(ord('J')))
{
    dirX += -1;  
}
if (keyboard_check(ord('K')))
{
    dirY += 1;   
}
if (keyboard_check(ord('L')))
{
    dirX += 1;   
}
if ((dirY != 0 || dirX != 0) && isAttackCooled(self.currentAttack, self.id))
{
    var angle = arctan2(dirY, dirX);
    var attack = manufactureAttack(self.currentAttack, self.id, angle);
}

